/*
 * @Descripttion:
 * @version:
 * @Author: wl
 * @Date: 2020-05-28 09:11:17
 * @LastEditors: wl
 * @LastEditTime: 2020-06-12 13:26:10
 */

import axios from "../axios";

// 楼栋配置列表
// export const buildingList = (params) => {
//     return axios({
//         url: '/main/service/buildingList',
//         method: 'post',
//         params
//     })
// }

// 楼栋配置添加/更新
export const buildingBatchAdd = data => {
  return axios({
    url: "/main/service/buildingBatchAdd",
    method: "post",
    data
  });
};
// 小区列表
export const communityList = data => {
  return axios({
    url: "admin/service/sys_community_list",
    method: "post",
    data
  });
};
// 小区新增
export const communityAdd = data => {
  return axios({
    url: "admin/service/sys_community_add",
    method: "post",
    data
  });
};
// 小区编辑
export const communityUpdate = data => {
  return axios({
    url: "admin/service/sys_community_update",
    method: "post",
    data
  });
};
// 删除小区
export const communityDelete = data => {
  return axios({
    url: "admin/service/sys_community_delete",
    method: "post",
    data
  });
};

// 楼栋列表
export const buildingList = data => {
  return axios({
    url: "admin/service/sys_building_list",
    method: "post",
    data
  });
};
// 查询小区
// sys_community_array
export const communityName = data => {
  return axios({
    url: "/admin/service/sys_community_array",
    method: "post",
    data,
    type: 2
  });
};
// 添加楼栋
export const buildingAdd = data => {
  return axios({
    url: "/admin/service/sys_building_add",
    method: "post",
    data
  });
};

// Ai能力层的数据  /admin/service/setCapabilitylayer_serverinfo
export const getAiData = data => {
  return axios({
    url: "/admin/service/getCapabilitylayer_serverinfo",
    method: "post",
    data
  });
};

// Ai能力层的数据 保存
export const saveAiData = data => {
  return axios({
    url: "/admin/service/setCapabilitylayer_serverinfo",
    method: "post",
    data
  });
};
// SL能力层的数据 保存
export const senseLink_config = data => {
  return axios({
    url: "/admin/service/senseLink_config",
    method: "post",
    data
  });
};
// SL能力层的数据列表
export const senseLink_list = data => {
  return axios({
    url: "/admin/service/senseLink_list",
    method: "post",
    data
  });
};

// 删除楼栋
// sys_building_remove
export const buildingRemove = data => {
  return axios({
    url: "/admin/service/sys_building_remove",
    method: "post",
    data
  });
};

// 楼栋编辑
// sys_building_update
export const buildingUpdate = data => {
  return axios({
    url: "/admin/service/sys_building_update",
    method: "post",
    data
  });
};

// 获取楼栋数组数据
// 获取楼栋
export const building_list_weChat = data => {
  return axios({
    url: "/admin/service/sys_building_list_weChat",
    method: "post",
    data
  });
};

//新增单元
export const unit_add = data => {
  return axios({
    url: "/admin/service/sys_unit_add",
    method: "post",
    data
  });
};

//开启单元门权限
export const open_unit_group = data => {
  return axios({
    url: "/admin/service/open_unit_group",
    method: "post",
    data
  });
};

//请求首页列表
export const sys_device_events_list = data => {
  return axios({
    // url: '/admin/service/sys_device_events_count',
    url: "/admin/service/sys_device_events_list",
    method: "post",
    data
  });
};
//首页异常接口

export const warning_list = data => {
  return axios({
    url: "/admin/service/warning_list",
    method: "post",
    data
  });
};
//报警设备
export const gsm_alarm_bindOrunbind = data => {
  return axios({
    url: "/admin/service/gsm_alarm_bindOrunbind",
    method: "post",
    data
  });
};
//报警设备列表接口

export const gsm_alarm_list = data => {
  return axios({
    url: "/admin/service/gsm_alarm_list",
    method: "post",
    data
  });
};

//报警设备推送绑定
export const gsm_alarm_configure = data => {
  return axios({
    url: "/admin/service/gsm_alarm_configure",
    method: "post",
    data
  });
};

//报警设备推送列表
export const gsm_alarm_configureList = data => {
  return axios({
    url: "/admin/service/gsm_alarm_configureList",
    method: "post",
    data
  });
};
//推送历史
export const gsm_alarm_log = data => {
  return axios({
    url: "/admin/service/gsm_alarm_log",
    method: "post",
    data
  });
};
